package com.ruoyi.platform.system.verify.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 验证码
 *
 * @author lcf
 */
@Data
@ApiModel
@NoArgsConstructor
public class VerifyCodeDTO {
    /**
     * 验证码key
     */
    @ApiModelProperty("验证码key")
    private String verifyKey;
    /**
     * img
     */
    @ApiModelProperty("验证码图片")
    private String img;
    /**
     * 是否显示
     */
    @ApiModelProperty("是否显示(1是0否)")
    private Integer isShow;

    public VerifyCodeDTO(String key, String img, boolean isShow) {
        this.verifyKey = key;
        this.img = img;
        this.isShow = isShow ? 1 : 0;
    }

    public VerifyCodeDTO(boolean isShow) {
        this.isShow = isShow ? 1 : 0;
    }
}
